package cn.iocoder.yudao.module.dbit.job;

import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
import cn.iocoder.yudao.module.dbit.service.jobinfo.JobInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @ClassName JobInfoTimeOutJob
 * @Author wzy
 * @qq交流 3116465773
 * @Description TODO
 */
@Component

@Slf4j
public class JobInfoTimeOutJob implements JobHandler {

    @Resource
    private JobInfoService jobInfoService;

    @Override
    @TenantJob
    public String execute(String param) throws Exception {
        jobInfoService.updateExpiredStatus();
        return "定时任务开启";
    }
}
